package cn.tedu.apps_system.pojo.dto;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;

@Data
public class UserRegDto {
    @ApiModelProperty(value = "用户名", required = true)
    @Pattern(regexp = "^(?=[\\u4e00-\\u9fa5a-zA-Z]*$)(?!(?:[^\\u4e00-\\u9fa5]*[\\u4e00-\\u9fa5]){8})(?!(?:[^a-zA-Z]*[a-zA-Z]){15}).*$",
            message = "用户名最长不超过7个中文和14个英文")
    private String username;
    @ApiModelProperty(value = "密码", required = true)
    @NotBlank(message = "密码不能为空")
    private String password;
    @ApiModelProperty(value = "手机号", required = true)
    private String phone;
    @ApiModelProperty(value = "角色", required = true)
    private Integer role;
    @ApiModelProperty(value = "权限", required = true)
    private Integer permission;
}
